/*
 * @Author: ljb
 * @Description: 
 * @Date: 2021-11-08 09:36:05
 * @LastEditTime: 2021-11-09 10:19:59
 * @FilePath: \mvvm\webpack.config.js
 */
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
    entry: './src/main.js',
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'index_bundle.js'
    },
    devtool: 'source-map',
    devServer: {
        contentBase: path.join(__dirname, 'dist'),
        compress: true,
        port: 9000,
    },
    plugins: [
        new HtmlWebpackPlugin({
            title: 'mvvm',
            template: path.resolve(__dirname, 'template/index.html'),
            filename: path.resolve(__dirname, 'dist/index.html')
        })
    ]
}
